<!DOCTYPE html>
<html>
	<head>
		<meta charset="UTF-8">
		<link rel="stylesheet" type="text/css" href="__PUBLIC__/css/layui.css" />
		<link rel="stylesheet" type="text/css" href="__PUBLIC__/css/style.css" />
		<title>教务-班级管理-开设班级</title>
	</head>
	<body>
	<form class="layui-form" action="{:U('Classsetting/setupclass')}" method="post">
		<input name="id" type="hidden" value="{$class_data.id}">
		<div id="main" class="layui-container">
			<div class="header layui-row">
				<div class=" headerList">
					<i class="Educational_icon"></i>
				  <span class="layui-breadcrumb" lay-separator=">">
					  <a href="javascript:;">教务</a>
					  <a href="javascript:;">班级管理</a>
					  <a href="javascript:;"><cite>开设班级</cite></a>
					</span>
				</div>
			</div>
			<div class="main layui-row">
				<div class="layui-col-md12 main_header">
					<blockquote class="layui-elem-quote">开设班级</blockquote>
				</div>
				<div class="layui-row main_con">
					<div class="layui-col-md5">
						<div class="layui-row layui-form-item">
							<span class="list_name">班级名称</span>
							<div class="list_con layui-input-block">
								<input type="text" name="classname" value="{$class_data.classname}" class="layui-input" placeholder="请输入..." lay-verify="required" />
							</div>
						</div>
						<div class="layui-row layui-form-item">
							<span class="list_name">班级编号</span>
							<div class="list_con layui-input-block">
							<!--	<button class="layui-btn layui-btn-disabled layui-input" id="class_num" style="text-align: left;background-color: #ebeaea;">系统自动生成</button>-->
								<input type="text" id="class_num" name="class_num" value="{$class_data.class_num}" class="layui-input layui-btn-disabled" value="" lay-verify="required"/>
							</div>
						</div>
						<div class="layui-row layui-form-item">
							<span class="list_name">课程分类</span>
							<div class="list_con layui-input-block">
								<select name="lecture">
									<option value="0">请选择</option>
									<foreach name="curriculum" item="c">
									<option value="{$c.id}" <if condition="$c['id'] eq $class_data['lecture']">selected</if>>{$c.cname}</option>
									</foreach>
								</select>
							</div>
						</div>
						<div class="layui-row layui-form-item layui-col-space20">
							<div class="layui-col-md6">
								<span class="list_name">主讲老师</span>
								<div class="list_con layui-input-block">
									<select name="teacher_id" lay-verify="required">
										<option value="0">请选择</option>
										<foreach name="staff" item="s">
										<option value="{$s.id}" <if condition="$s['id'] eq $class_data['teacher_id']">selected</if>>{$s.name}</option>
										</foreach>
									</select>
								</div>
							</div>
							<div class="layui-col-md6">
								<span class="list_name">班主任/助教</span>
								<div class="list_con layui-input-block">
									<select name="headmaster_id" lay-verify="required">
										<option value="0">请选择</option>
										<foreach name="staff" item="s">
										<option value="{$s.id}" <if condition="$s['id'] eq $class_data['headmaster_id']">selected</if>>{$s.name}</option>
										</foreach>
									</select>
								</div>
							</div>
						</div>
						<div class="layui-form-item" >
							<div class="label-div" style="padding-top: 25px">
								<label class="form-label">一周上课安排</label>
							</div>
							<div class="layui-input-inline" id="radioContent" style="width: 500px;float: left;">
								<input type="checkbox" lay-filter="select1" name="week_id[]" value="1" title="星期一" <if condition="in_array(1,$class_data['week_id'])">checked</if>>
								<input type="checkbox" lay-filter="select2" name="week_id[]" value="2" title="星期二" <if condition="in_array(2,$class_data['week_id'])">checked</if>>
								<input type="checkbox" lay-filter="select1" name="week_id[]" value="3" title="星期三" <if condition="in_array(3,$class_data['week_id'])">checked</if>>
								<input type="checkbox" lay-filter="select2" name="week_id[]" value="4" title="星期四" <if condition="in_array(4,$class_data['week_id'])">checked</if>>
								<input type="checkbox" lay-filter="select1" name="week_id[]" value="5" title="星期五" <if condition="in_array(5,$class_data['week_id'])">checked</if>>
								<input type="checkbox" lay-filter="select2" name="week_id[]" value="6" title="星期六" <if condition="in_array(6,$class_data['week_id'])">checked</if>>
								<input type="checkbox" lay-filter="select1" name="week_id[]" value="0" title="星期日" <if condition="in_array(7,$class_data['week_id'])">checked</if>>
							</div>
						</div>
						<div class="layui-row layui-form-item">
							<span class="list_name">上课时间段</span>
							<div class="list_con layui-input-block">
								<select name="time_slot" lay-verify="required">
									<option value="0">请选择</option>
									<foreach name="other" item="o">
									<if condition="$o['pid'] eq 22">
									<option value="{$o.id}" <if condition="$o['id'] eq $class_data['time_slot']">selected</if>>{$o.name}</option>
									</if>
									</foreach>
								</select>
							</div>
						</div>
						<!--
						<div class="layui-row layui-form-item">
							<span class="list_name">考勤选项</span>
							<div class="list_con layui-input-block layui-row layui-col-space20">
								<div class="layui-col-md4">
									<select name="options" lay-verify="required">
										<option value=""></option>
										<option value="0">物理</option>
										<option value="1">语文</option>
										<option value="2">数学</option>
										<option value="3">英语</option>
									</select>
								</div>
								<div class="layui-col-md4">
									<select name="options1" lay-verify="required">
										<option value=""></option>
										<option value="0">物理</option>
										<option value="1">语文</option>
										<option value="2">数学</option>
										<option value="3">英语</option>
									</select>
								</div>
								<div class="layui-col-md4">
									<select name="options2" lay-verify="required">
										<option value=""></option>
										<option value="0">物理</option>
										<option value="1">语文</option>
										<option value="2">数学</option>
										<option value="3">英语</option>
									</select>
								</div>
								<div class="layui-col-md6">
									<div class="layui-row">
										<input type="text" class="layui-input" id="signIn" placeholder="签到时间">
									</div>
								</div>
								<div class="layui-col-md6">
									<div class="layui-row">
										<input type="text" class="layui-input" id="SignBack" placeholder="签退时间">
									</div>
								</div>
							</div>
						</div>-->
						<div class="layui-row layui-form-item layui-col-space20">
							<div class="layui-col-md6">
								<span class="list_name">开课日期</span>
								<div class="list_con layui-input-block">
									<input type="text" name="start_time" value="{$class_data.start_time}" class="layui-input" id="startDate" placeholder="开课时间">
								</div>
							</div>
							<div class="layui-col-md6">
								<span class="list_name">结束日期</span>
								<div class="list_con layui-input-block">
									<input type="text" name="end_time" value="{$class_data.end_time}" class="layui-input" id="endDate" placeholder="结束时间">
								</div>
							</div>
						</div>
						<div class="layui-row layui-form-item">
							<span class="list_name">计划招生数</span>
							<div class="list_con layui-input-block">
								<input type="text" name="enrollment_number" value="{$class_data.enrollment_number}" class="layui-input" id="number_plan" placeholder="请输入..." />
							</div>
						</div>
						<div class="layui-row layui-form-item">
							<span class="list_name">录入员 | {$_SESSION['qe_user'].name}</span>
							<input type="hidden" name="xid" value="{$_SESSION['qe_user'].xid}">
							<input type="hidden" name="scid" value="{$_SESSION['qe_user'].id}">
						</div>
					</div>
					<div class="layui-col-md2">&nbsp;</div>
					<div class="layui-col-md5">
						<div class="layui-row layui-form-item">
							<span class="list_name">教室</span>
							<div class="list_con layui-input-block">
								<select name="staff_id" lay-verify="required">
									<option value="0">请选择</option>
									<foreach name="room" item="r">
										<option value="{$r.id}" <if condition="$r['id'] eq $class_data['staff_id']">selected</if>>{$r.roomname}</option>
									</foreach>
								</select>
							</div>
						</div>
						<div class="layui-row layui-form-item">
							<span class="list_name">总课时</span>
							<div class="list_con layui-input-block">
								<input type="text" name="total_course" value="{$class_data.total_course}" class="layui-input" id="totalHours" placeholder="请输入..." />
							</div>
						</div>
						<div class="layui-row layui-form-item">
							<span class="list_name">每课时(分钟)</span>
							<div class="list_con layui-input-block">
								<input type="text" name="each_course" value="{$class_data.each_course}" class="layui-input" id="everyHours" placeholder="请输入..." />
							</div>
						</div>
						<div class="layui-row layui-form-item">
							<span class="list_name">班级介绍</span>
							<div class="list_con layui-input-block">
								<textarea name="content" id="introduce" placeholder="请输入内容" class="layui-textarea" >{$class_data.content}</textarea>
							</div>
						</div>
						<div class="layui-row layui-form-item">
							<span class="list_name">班级状态</span>
							<div class="list_con layui-input-block">
								<select name="class_state" lay-verify="required">
									<option value="1" <if condition="$class_data['class_state'] eq 1">selected</if>>开启</option>
									<option value="0" <if condition="$class_data['class_state'] eq 0">selected</if>>关闭</option>
								</select>
							</div>
						</div>
						<div class="layui-row layui-form-item">
							<span class="list_name">是否为试听课</span>
							<div class="list_con layui-input-block">
								<select name="auditions_id" lay-verify="required">
									<option value="1" <if condition="$class_data['auditions_id'] eq 1">selected</if>>是</option>
									<option value="0" <if condition="$class_data['auditions_id'] eq 0">selected</if>>否</option>
								</select>
							</div>
						</div>
					</div>
					<div class="layui-row layui-form-item">
						<div class="layui-input-block" style="text-align: center;">
						  <button class="layui-btn" lay-submit="">提交</button>
						  <button type="button" onclick="window.location.href='{:U('Classsetting/classList')}'"  class="layui-btn" style="background-color: #666666;">返回</button>
						</div>
					</div>
				</div>
			</div>
		</div>
	</form>
<script src="__PUBLIC__/js/layui.all.js" type="text/javascript" charset="utf-8"></script>
<script type="text/javascript">
	layui.use(['form','laydate'], function(){
  var form = layui.form,
	laydate = layui.laydate;
	// 签到时间
	laydate.render({
		elem: '#signIn' //指定元素
	});
	 // 签退时间
	laydate.render({
		elem: '#SignBack'
	});
	// 开课时间
	laydate.render({
		elem: '#startDate'
	});
	// 结束时间
	laydate.render({
		elem: '#endDate'
	});
});

</script>
	</body>
</html>
